SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[ModelosInsertCommand]
(
	@ID numeric(10, 0),
	@MODELO varchar(50),
	@ACTIVO bit
)
AS
	SET NOCOUNT OFF;
	
DECLARE @I NUMERIC(10,0) = (SELECT(ISNULL(MAX([MODELOS].ID),0))+1 FROM [MODELOS]);
	
INSERT INTO [MODELOS] ([ID], [MODELO], [ACTIVO]) VALUES (@I, @MODELO, @ACTIVO);
	
SELECT ID, MODELO, ACTIVO FROM MODELOS WHERE (ID = @I)
GO
